package main

import (
	"fmt"
	"redisOp/redis"
	"time"
)

func main() {
	r := redis.NewRedis()
	fmt.Println(r.Exists("k1"))
	fmt.Println(r.TTL("k1"))
	r.Set("k2", "v2")
	fmt.Println(r.Get("k2"))

	r.SetEx("k3", "v3", time.Minute)
	fmt.Println(r.Get("k3"))

	err := r.SetExAt("k4","v4",time.Now().Add(time.Minute))
	fmt.Println(err)
	fmt.Println(r.Get("k4"))
}
